
var bgarray = [
   ['bgid1', 'Aquarela', 'images/wallpapers/aquarela1-thumb.JPG', 'images/wallpapers/aquarela1.jpg'],
   ['bgid2', 'Aquarela 2', 'images/wallpapers/aquarela-thumb.JPG', 'images/wallpapers/aquarela.jpg'],
   ['bgid3', 'Azul', 'images/wallpapers/azul-thumb.JPG', 'images/wallpapers/azul.jpg'],
   ['bgid4', 'Cinza', 'images/wallpapers/cinza-thumb.JPG', 'images/wallpapers/cinza.jpg'],
   ['bgid5', 'Vermelho', 'images/wallpapers/vermelho-thumb.JPG', 'images/wallpapers/vermelho.jpg'],
   ['bgid6', 'Floral', 'images/wallpapers/floral-thumb.JPG', 'images/wallpapers/floral.jpg'],
   ['bgid7', 'Verde', 'images/wallpapers/verde-thumb.JPG', 'images/wallpapers/verde.jpg'],
   ['bgid8', 'Laranja', 'images/wallpapers/laranja-thumb.JPG', 'images/wallpapers/laranja.jpg'],
	['bgid9', 'Branco', 'images/wallpapers/branco-thumb.JPG', '#FFFFFF']
	
   ];

var corarray = [
   ['Azul', 'images/wallpapers/azul-thumb.JPG'],
   ['Cinza', 'images/wallpapers/cinza-thumb.JPG'],
   ['Laranja', 'images/wallpapers/laranja-thumb.JPG'],
   ['Verde', 'images/wallpapers/verde-thumb.JPG'],
   ['Vermelho', 'images/wallpapers/vermelho-thumb.JPG'],
   ['Branco', 'images/wallpapers/branco-thumb.JPG']
		    ];

function getBgArray(bid){
	for(b=0;b<bgarray.length;b++){
		if(bgarray[b][0] == bid) return bgarray[b];
	}
	return null
}

function usagrade(){
	if(pega('usagra') != null && pega('usagra').value=='S'){
		return false;
	}
	return true;	
}

function testaModulos(str){
	var n = 0; 
	var mos = pega('login_modulos').value;
	mos = mos.toUpperCase();
	str = str.toUpperCase();
	
	for(var t=0; t<str.length; t++){
		if(mos.indexOf(str.charAt(t))>-1)return true;
	}
	return false;
}

function sair(){
	
	 AtualizarPag("index.jsp");
		
}

var janelaconsulta;
